#ifndef TABBARPANEL_H
#define TABBARPANEL_H
#include <QWidget>
#include "../terminalglobals.h"

class QPushButton;

namespace ExecTerminalImplNS
{
    class TopTabBar;
    class TabBarHorLine;
    class TabBarPanel: public QWidget 
    {
        Q_OBJECT
    public:
        TabBarPanel(QWidget * parent);
        
        TopTabBar * tabBar()const;
        QPushButton * listButton()const;
        QPushButton * thumbnailsButton()const;
        QPushButton * newTabButton()const;
        TabBarHorLine * tabBarLine()const;
        void setOrientation(Orientation ornt);
        Orientation orientation()const;
        QSize minimumSizeHint()const;

    public slots:
        void addTab();
        void changeOrientation();

    signals:
        void tabCreated(int tabIndex, int tabData);

    protected:
        void paintEvent(QPaintEvent *);
        void resizeEvent(QResizeEvent *);

    private:
        virtual void layoutButtons();
        virtual void layoutTabBar();

    private:
        TopTabBar * theTabBar;
        TabBarHorLine * theTabBarLine;
        QPushButton * theListButton;
        QPushButton * theThumbnailsButton;
        QPushButton * theNewTabButton;
        int theTabBarLeftIndent;
        int theTabUID;
    };
}
#endif

